package com.system.utils;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 线程池工具类
 *
 * @author 佛冷
 * @date 2021/5/7
 */
public class ExecutorUtil {

    private static ExecutorService executor = new ThreadPoolExecutor(5, 10, 20L, TimeUnit.SECONDS, new ArrayBlockingQueue(10));

    public static void submit(Runnable runnable) {
        executor.submit(runnable);
    }

}
